package org.jeecg.modules.company.facade.impl;



import org.springframework.stereotype.Service;


import org.jeecg.base.facade.impl.IFacadeImpl;
import org.jeecg.modules.company.entity.Product;
import org.jeecg.modules.company.facade.IProductFacade;
import org.jeecg.modules.company.service.IProductService;
import org.jeecg.modules.company.vo.ProductVo;
import org.springframework.beans.BeanUtils;

import org.springframework.beans.factory.annotation.Autowired;


/**
 * @Description: 产品
 * @Author: zj
 * @Date:   2020-05-26
 * @Version: V1.0
 */


@Service
public class ProductFacadeImpl extends IFacadeImpl<ProductVo, Product, IProductService>  implements IProductFacade<ProductVo, Product> {
        @Autowired
        private IProductService productService;


         @Override
         public Product po2Vo(ProductVo vo) {
                Product po = new Product();
                if(vo==null){
                   return null;
                }
                BeanUtils.copyProperties(vo, po);
                return po;
         }

         @Override
         public ProductVo vo2Po(Product po) {
                ProductVo vo = new ProductVo();
                 if(po==null){
                     return null;
                  }
                BeanUtils.copyProperties(po, vo);
                return vo;
         }

}
